package model;


public enum HoldEmGameRoundState implements GameRoundState
{
	START(0), PRE_FLOP(1), FLOP(2), TURN(3), RIVER(4), END(5);
	
	private final int index;
	
	private HoldEmGameRoundState(int index)
	{
		this.index = index;
	}
	
	public boolean hasNext()
	{
		return index < 5;
	}
	
	public HoldEmGameRoundState next()
	{
		return HoldEmGameRoundState.values()[index + 1];
	}
	
	public int toInteger()
	{
		return index;
	}
	
	public String toString()
	{
		switch (this)
		{
			case START:
				
				return "Start game";
			
			case PRE_FLOP:
				
				return "Pre-flop";
			
			case FLOP:
				
				return "Flop";

			case TURN:
				
				return "Turn";
			
			case RIVER:
				
				return "River";
			
			case END:
				
				return "End game";
		}
		
		return null;
	}
}
